//
//  WShopUploadView.m
//  quxiangtao
//
//  Created by HHuajiang on 2018/12/12.
//  Copyright © 2018 shanhaijin. All rights reserved.
//

#import "WShopUploadView.h"

@implementation WShopUploadView

- (instancetype)initWithTitle:(NSString *)title {
    
    if (self = [super init]) {
        UIView *line = [[UIView alloc] init];
        line.backgroundColor = Colorff0000;
        [self addSubview:line];
        [line mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(10);
            make.top.mas_equalTo(Margin);
            make.width.mas_equalTo(2);
            make.height.mas_equalTo(jisuan(30));
        }];
        
        UILabel *nameLabel = [[UILabel alloc] init];
        nameLabel.text = title;
        nameLabel.textColor = Color333333;
        nameLabel.font = Font(30);
        [self addSubview:nameLabel];
        [nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(line.mas_right).offset(10);
            make.centerY.equalTo(line.mas_centerY);
        }];
        
        LTTextView *textField = [[LTTextView alloc] init];
        textField.placeholderTextView.text = @"（选填）";
        textField.placeholderTextView.font = [UIFont fontWithName:@"PingFangSC-Thin" size:font(28)];
        textField.tintColor = Colorff0000;
        [self addSubview:textField];
        [textField mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(jisuan(1.5));
            make.right.mas_equalTo(-10);
            make.left.equalTo(nameLabel.mas_right).offset(5);
            make.bottom.mas_equalTo(-0.5);
        }];
        self.textView = textField;
        
        UIView *lineee = [[UIView alloc] init];
        lineee.backgroundColor = [UIColor colorWithHexString:@"#dedede"];
        [self addSubview:lineee];
        [lineee mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.right.mas_equalTo(0);
            make.height.mas_equalTo(0.5);
            make.left.mas_equalTo(Margin);
        }];
    }
    return self;
}

@end
